﻿namespace Dyao.Book.Application
{
    /// <summary>
    /// 任务中心记录
    /// </summary>
    public class TaskCenterRecordInfoDto<TExcutingInfo, TResult> : TaskCenterRecordProgressModel
    {
        public TaskCenterRecordInfoDto(TExcutingInfo excutingInfo)
        {
            ExcutingInfo = excutingInfo;
        }

        /// <summary>
        /// 运行中配置
        /// </summary>
        public TExcutingInfo ExcutingInfo { get; }

        /// <summary>
        /// 运行结果
        /// </summary>
        public TResult ExcuteResult { get; set; }
    }

    /// <summary>
    /// 任务中心记录
    /// </summary>
    public class TaskCenterRecordExcutingInfoModel<TExcutingInfo> : TaskCenterRecordProgressModel
    {
        public TaskCenterRecordExcutingInfoModel(TExcutingInfo excutingInfo)
        {
            ExcutingInfo = excutingInfo;
        }

        /// <summary>
        /// 运行中配置
        /// </summary>
        public TExcutingInfo ExcutingInfo { get;}
    }

    /// <summary>
    /// 任务中心记录
    /// </summary>
    public class TaskCenterRecordResultModel<TResult> : TaskCenterRecordProgressModel
    {

        /// <summary>
        /// 运行结果
        /// </summary>
        public TResult ExcuteResult { get; set; }
    }

    /// <summary>
    /// 任务中心记录
    /// </summary>
    public class TaskCenterRecordProgressModel
    {

        /// <summary>
        /// 执行进度
        /// </summary>
        public decimal ExcutingProgress { get; set; }

        /// <summary>
        /// Result信息
        /// </summary>
        public string ResultMessage { get; set; }
    }
}
